# 创建元组
t1 = ('Tom', 'Kate', 'Jone', 'Luke', 'Kate')
# 统计
# print(len(t1))
# print(t1.count('Kate'))
# print(t1.index('Luke'))

# print(t1, type(t1))
# 访问元素
# print(t1[0], t1[-2], t1[-2:])
# 遍历元组 for
# for item in t1:
#     print(item)
# 不支持修改元组
# t1[0] = 'Jacky'

# 元组中只有一个元素，需要加逗号
t2 = ('Tom', )
print(t2, type(t2))


